package com.atguigu.springbootweb.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;


import java.util.Arrays;
import java.util.Map;

/**
 * @author xp
 * @create 2020-01-08 8:41
 */
@Controller
public class HelloWorldController {
//    @RequestMapping({"/","/login.html"})
//    public String index(){
//        return "login";
//    }

    @ResponseBody
    @RequestMapping("/hello")
    public String sayHello(){
        return "hello world!!!!!!";
    }

    @RequestMapping("/success")
    public String success(Map<String,Object> map){
        map.put("hello","你好");
        map.put("users", Arrays.asList("张三","李四","王五"));
        return "success";
    }
}
